package cn.edu.sgu.www.mhxysy.entity.repository;

import cn.edu.sgu.www.mhxysy.consts.IdentifierPrefixes;
import cn.edu.sgu.www.mhxysy.util.StringUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色仓库
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
@TableName("repository")
public class RoleRepository implements Serializable {
    private static final long serialVersionUID = 18L;

    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value = "ID")
    private String id;

    /**
     * 仓库名字
     */
    @ApiModelProperty(value = "仓库名字")
    private String name;

    /**
     * 角色ID
     */
    @ApiModelProperty(value = "角色ID")
    private String roleId;

    /**
     * 仓库位置
     */
    @ApiModelProperty(value = "仓库位置")
    private Integer location;

    public String uuid() {
        return IdentifierPrefixes.PREFIX_JSCK + StringUtils.uuid();
    }

}